Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edu 13 post module exam #39

Merged
merged 3 commits into from
Oct 30, 2023
Merged

Edu 13 post module exam #39

merged 3 commits into from
Oct 30, 2023

Conversation

akaneshiro7
Copy link
Contributor

@akaneshiro7 akaneshiro7 commented Oct 6, 2023

What was the ticket?

Create an Post Endpoint to submit ModuleExams, check answers to create a score, and add it to the database.

Link to Ticket:
#34

What did I do?

I modified the ModuleExam schema to have an answer section, and removed the user-associated columns.
I parsed the input of the post request to get the moduleId and userId. The moduleId was used to get the correct answers from the database, which were checked against a submission. A score was generated. Relevant information was pushed to update the user database based on the userID. Finally, the response was sent back to the user.

How did I test it? Document test cases here.

Valid Information (all inputs correct)

image

Valid Information (1 input correct, 1 wrong)

image

Invalid User ID

image

Invalid Module ID

image

Invalid submission (lengths of questions and submission were not same)

image

Database Updated Proof

image

What could go wrong in the future? What parts of your code should the reviewer pay the most attention to?

May have the update the way information is stored in the database or formatting of data.

Additional comments for the reviewers

May be able to update in the future with include statements. Was Buggy with my VSCode Cache and threw errors

@akaneshiro7 akaneshiro7 linked an issue Oct 6, 2023 that may be closed by this pull request
@TylerSchaefer4 TylerSchaefer4 merged commit 9694d17 into main Oct 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EDU-13 Post module exam
2 participants